home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
autofx
/
eot_pondripple.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
3KB
|
109 lines
/*
* $VER: EOT_PondRipple.ifx 2.6 (24.04.96)
* Copyright © 1992-1996 Nova Design, Inc.
* Written by Ola Eric Olsson
*/
OPTIONS RESULTS
framenum = Word(Arg(1),1)
mainname = Word(Arg(1),2)
swapname = Word(Arg(1),3)
seqnum = Word(Arg(1),4)
framemax = Word(Arg(1),5)
base = 'autofx_pondripple_'
xcen = GETCLIP(base||'xcen')
ycen = GETCLIP(base||'ycen')
startsize = GETCLIP(base||'startsize')
endsize = GETCLIP(base||'endsize')
amp = GETCLIP(base||'amp')
startrad = GETCLIP(base||'startrad')
damp = GETCLIP(base||'damp')
/*
* text.1 = '" Xcen: '||xcen||'"'
* text.2 = '" Ycen: '||ycen||'"'
* text.3 = '"Startsize: '||startsize||'"'
* text.4 = '" Endsize: '||endsize||'"'
* text.5 = '" Amp: '||amp||'"'
* text.6 = '" Startrad: '||startrad||'"'
* text.7 = '" Damp: '||damp||'"'
*
* top = 0
* title = '"Test"'
* DO i = 1 to 7
* top = top+20
* gad.i = 'TEXT LE=160 TE='top' WD=1 HT=1 LB='text.i' JU=1'
* END
*
* gad.8 = 'END'
*
* newcomplexrequest title gad 380 160
* IF rc ~= 0 THEN EXIT rc
*
*/
GetMain
IF RC ~= 0 THEN EXIT rc
PARSE VAR RESULT name width height .
IF xcen = -1 THEN xcen = width%2
IF ycen = -1 THEN ycen = height%2
centered = 1
CALL getrad
maxrad = rad*1.2
sizediff = endsize - startsize
size = TRUNC(startsize + (sizediff * (framenum-1)/(framemax-1)))
a = 360 * (framenum-1) / (framemax-1)
outrad = TRUNC(startrad + ((framenum-1)*(maxrad/framemax)))
ampl = TRUNC(amp - (80*(framenum/framemax)))
Hook Wave Amplitude ampl Length size Angle a ,
CenterX xcen CenterY ycen Distance outrad Dampen damp Inward AntiAlias Stretch
EXIT
/******************************************************************/
/** Calculates max radius **/
/******************************************************************/
getrad:
IF centered = 1 THEN
DO
opp = height/2
adj = width/2
rad = TRUNC(SQRT((opp**2)+(adj**2)),4)
END
ELSE
DO
IF xcen > (width/2) THEN adj = xcen
ELSE adj = (width-xcen)
IF ycen > (height/2) THEN opp = ycen
ELSE opp = (height-ycen)
rad = TRUNC(SQRT((opp**2)+(adj**2)),4)
END
RETURN
/******************************************************************/
/** Rounds numbers **/
/******************************************************************/
ROUND:
PARSE ARG number
IF ABS(number) < 1 THEN RETURN(TRUNC(number))
number = TRUNC(number)+((number//TRUNC(number))>=.5)
RETURN(number)